import 'package:flutter/material.dart';
class TapAppBar extends PreferredSize{
  Widget child;
  @override
  final Size preferredSize;
  TapAppBar(this.child,this.preferredSize);
 @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return this.child;
  }
  }
 class TapViewBar extends StatelessWidget {
   Widget title;
   Widget icon;
   Widget button;
   TapViewBar(this.title,{this.icon,this.button});
   @override
   Widget build(BuildContext context) {
     return AppBar(
       centerTitle: true,
       title: title,
       bottom: button==null?null:button,
       leading: icon==null?null:IconButton(icon: icon,color: Colors.white, onPressed: ()=>Navigator.pop(context)),
     );
   }
 }




